package cate.game.pvp.jungle;

import cate.common.table.common.CommonExcel;
import cate.common.table.d.GDParamTool;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;
import lombok.experimental.UtilityClass;

@UtilityClass
@NoteClass("丛林冒险常量")
public class JungleConstants {
    @NoteField("战报类型-掠夺")
    public static final int REPORT_TYPE_ROB = 1;
    @NoteField("战报类型-防守")
    public static final int REPORT_TYPE_DEFEND = 2;

    @NoteField("BUFF类型-自动添加")
    public static final int BUFF_TYPE_AUTO = 0;
    @NoteField("BUFF类型-稀有任务添加")
    public static final int BUFF_TYPE_RARE = 1;

    @NoteField("BUFF-收益翻倍")
    public static final int BUFF_EFFECT_MULTIPLE_REWARD = 1;
    @NoteField("BUFF-任务时长缩减")
    public static final int BUFF_EFFECT_REDUCE_TASK_TIME = 2;
    @NoteField("BUFF-进攻方战斗BUFF")
    public static final int BUFF_EFFECT_ATTACK_BUFF = 3;
    @NoteField("BUFF-防守方战斗BUFF")
    public static final int BUFF_EFFECT_DEFEND_BUFF = 4;

    @NoteField("单个任务最多掠夺次数")
    public static int TASK_ROB_MAX = 2;
    @NoteField("玩家单日最多派遣次数")
    public static int DAILY_PLAY_MAX = 3;
    @NoteField("玩家单日最多掠夺次数")
    public static int DAILY_ROB_MAX = 3;
    @NoteField("普通刷新耗费钻石")
    public static String NORMAL_REFRESH_COST = "0:2:50";
    @NoteField("直达最高刷新耗费钻石")
    public static String DIRECT_REFRESH_COST = "0:2:750";
    @NoteField("每分钟加速消耗钻石数")
    public static String SPEED_UP_COST_PER_MIN = "0:2:30";
    @NoteField("战报数量上限")
    public static int REPORT_NUM_MAX = 20;
    @NoteField("触发稀有任务跑马灯ID")
    public static int RARE_LAMB_ID = 8848008;

    /**
     * 从配置中读取常量
     *
     * @param common 通用配置
     */
    public static void loadFromTable(CommonExcel common) {
        TASK_ROB_MAX = GDParamTool.getInt(common.param, 750, TASK_ROB_MAX);
        DAILY_PLAY_MAX = GDParamTool.getInt(common.param, 751, DAILY_PLAY_MAX);
        DAILY_ROB_MAX = GDParamTool.getInt(common.param, 752, DAILY_ROB_MAX);
        NORMAL_REFRESH_COST = GDParamTool.getString(common.param, 753, NORMAL_REFRESH_COST);
        DIRECT_REFRESH_COST = GDParamTool.getString(common.param, 754, DIRECT_REFRESH_COST);
        SPEED_UP_COST_PER_MIN = GDParamTool.getString(common.param, 755, SPEED_UP_COST_PER_MIN);
        REPORT_NUM_MAX = GDParamTool.getInt(common.param, 756, REPORT_NUM_MAX);
        RARE_LAMB_ID = GDParamTool.getInt(common.param, 757, RARE_LAMB_ID);
    }
}
